﻿<Window x:Class="WpfDragAndDrop.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
<StackPanel>
        <Button Name="button" 
                Content="OK" 
                PreviewMouseLeftButtonDown="button_PreviewMouseLeftButtonDown" 
                PreviewMouseMove="button_PreviewMouseMove"/>
        <TextBox Name="textBox"
                 AllowDrop="True"
                 PreviewDragEnter="textBox_Dragging"
                 DragEnter="textBox_Dragging"
                 PreviewDragOver="textBox_Dragging"
                 DragOver="textBox_Dragging"
                 Drop="textBox_Drop"/>
        <TextBlock Name="status"
                   Text="No dragging"/>
    </StackPanel>
</Window>
